<template>
    <div>
        <h1>测试登录</h1>
        <input type="text" v-model="username">
        <button @click="login">登录到人工聊天</button>
        <button @click="login1">登录到AI聊天</button>
    </div>
</template>

<script setup lang="ts">
import {ref} from 'vue'
import {useRouter} from 'vue-router'
const router = useRouter()
const username = ref('')
const login = ()=>{
    router.push({
        path:'/talk_doctor',
        query:{username:username.value}
    })
}
const login1 = ()=>{
    router.push({
        path:'/AIChat',
        query:{username:username.value}
    })
}
</script>

<style scoped>

</style>